import React, { Component } from "react";

import { NavBar, Icon } from "antd-mobile";
import "./index.scss";
import PropTypes from "prop-types";
class MyFixNavBar extends Component {
  render() {
    const {
      navBarName,
      fontColor,
      NavigationRouteGoBact,
      customizedBackgroundColor,
    } = this.props;
    return (
      <div className="FixNavBarWrapper">
        <NavBar
          style={{
            backgroundColor: ` ${customizedBackgroundColor || "white"} `,
            color: ` ${fontColor || "#aab6b4"}`,
          }}
          icon={<Icon type="left" />}
          onLeftClick={() => NavigationRouteGoBact()}
        >
          {navBarName || "顶部导航"}
        </NavBar>
      </div>
    );
  }
}
MyFixNavBar.propTypes = {
  navBarName: PropTypes.string.isRequired,

  NavigationRouteGoBact: PropTypes,
};
export default MyFixNavBar;
